home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / do1beta.zip / HYPER.DO < prev    next >
Text File  |  1991-07-25  |  769b  |  31 lines

  1. /*
  2.     this is a demo of dObject's hypertext display feature
  3.     first, define a method to handle the "Application key 1"
  4.     (ctrl-F1) key when it is pressed
  5. */
  6. method Int::onApplicationKey(self,s)
  7. {
  8. /*
  9.     create a window for the text
  10. */
  11.     w = new(Window,1,112,112,"",5,5,10,40);
  12. /*
  13.     display the text
  14.     to follow the link for a highlighted field, hit the ctrl-f1 key
  15. */
  16.     display("the topic selected was "+s);
  17.     remove(w);
  18. }
  19.  
  20. /*
  21.     demo hypertext
  22. */
  23. #define COLOR 79
  24. db = new(Dbffile,"help");
  25. index = new(Ndxfile,db,"help");
  26. w = new(Window,1,112,112," Hypertext ",1,1,22,78);
  27. display(htExpand(db,index,COLOR,32,"asString asDate currentWindow date time"));
  28. remove(w);
  29. close(db);
  30. clearMemory(); % this removes the version of Int::onHyperKey() defined above
  31.